<?php include 'session.php'?>
<?php
$firstName = $_SESSION['firstName'];
$lastName = $_SESSION['lastName'];
$address = $_SESSION['address'];
$city = $_SESSION['city'];
$zipcode = $_SESSION['zipcode'];
$state = $_SESSION['state'];
$country = $_SESSION['country'];
$phone = $_SESSION['phone'];

$total = $_SESSION['total'];
$shipPrice = $_SESSION['shipPrice'];

$cardType = $_SESSION['cardType'];
$cardNumber = $_SESSION['cardNumber'];

$cid = $_SESSION['cid'];
$shoppingCartInfo = $soap->call($session_id, "cart.info", array($cid));

$flag = false;
?>
<?php include 'header.php'?>

<div id="Main">
    <div id="Content">
		<header class="row">
			<h2>Confirmation</h2>
		</header>
		
		<div class="row">
<?php
if ($flag == true) {
	echo print_r($shoppingCartInfo);
}
?>
			<p>Name: <?php echo $firstName . " " . $lastName; ?> </p>
			<p>Address: <?php echo $address . ", ". $city . ", " . $state . " " . $zipcode . ", " . $country; ?></p>
			<p>Phone Number: <?php echo $phone; ?></p>
			<p>Price: </p>
			<p>Products: $<?php echo $total; ?></p>
			<p>Shipping: $<?php echo $shipPrice; ?></p>
			<p>Total:    $<?php echo $total + $shipPrice; ?> </p>
			<p>Card Type: <?php echo $cardType; ?> </p>
			<p>Card Number: ************<?php echo substr($cardNumber, -4); ?> </p>
		
			<br/>
			<ul class="buttons">
				<li style="float:left"><input type="button" value="Back" onclick="javascript:history.go(-1);" class="button-secondary" /></li>
				<li style="float:left; margin-left:10px"><a href="thanku.php" class="button-secondary">Confirm</a></li>
			</ul>
			<br/>
		</div>
	</div>
	
<?php include 'footer.php'?>